﻿using RXY_Mall.AdminApi.Common;
using RXY_Mall.Data;
using RXY_Mall.Services;
using RXY_Mall.Services.User;
using RXY_Mall.Services.User.Dto;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Web.Http;

namespace RXY_Mall.AdminApi.Controllers
{
    /// <summary>
    /// 用户接口
    /// </summary>
    [RoutePrefix("User")]
    [ApiSecurityFilter]
    public partial class UserController : BaseApiController
    {
        private IUserService userService;

        /// <summary>
        /// 缓存时间 单位s
        /// </summary>
        public const int CACHETIME = 5;

        public UserController()
        {
            userService = new UserService();
        }

        /// <summary>
        /// 批量添加用户
        /// </summary>
        /// <param name="input">输入信息</param>
        [HttpPost]
        [Route("AddUsers")]
        public async Task<ResponseService<UserOutput>> AddUsers(AddUserInput input)
        {
            return await userService.AddUsers(input);
        }
    }
}